x86/boot: Fix boot following c/s b6c2c7f48a
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Jan 2018 23:38:40 +0000 (23:38 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 12 Jan 2018 11:22:54 +0000 (11:22 +0000)
commitcc09b40970e8f62a91bec9f35f0160bdc601fa57
tree7f893e2bd4a5bf681581e766b07bed0daa4d716a
parent3cf7ee82e16cacd7c3dd371dead46b90f52fa905
x86/boot: Fix boot following c/s b6c2c7f48a

c/s b6c2c7f48a unfortunately broke booting on affected systems.  Most of the
time, ioemul_handle_quirk() doesn't write a custom stub, and the redundant
call was depending on the seemingly-pointless writing of the default stub.

Alter the ioemul_handle_quirk() API to return a boolean if a custom stub was
written, allowing its caller to know whether it should write a default stub
instead.

Finally, adjust the /* Regular stubs */ comment to make it clearer that the 16
refers to the length of the emul stub opcode.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/ioport_emulate.c
xen/arch/x86/pv/emul-priv-op.c
xen/arch/x86/traps.c
xen/include/asm-x86/io.h